<?php
/**
 * @author Vitaly
 * Date: 02.05.12
 */
class CommentModel
{
    private $id;
    private $message; // id сообщения
    private $author;  // модель автора
    private $text;    // текст комментария

    function __construct($id = null, $message = null, $author = null, $text = null)
    {
        $this->setId($id)
             ->setMessage($message)
             ->setAuthor($author)
             ->setText($text);
    }

    public function setAuthor($author)
    {
        $this->author = $author;
        return $this;
    }

    public function getAuthor()
    {
        return $this->author;
    }

    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    public function getId()
    {
        return $this->id;
    }

    public function setMessage($message)
    {
        $this->message = $message;
        return $this;
    }

    public function getMessage()
    {
        return $this->message;
    }

    public function setText($text)
    {
        $this->text = $text;
        return $this;
    }

    public function getText()
    {
        return $this->text;
    }
}
